package com.my.hotel.mapper;
import com.my.hotel.entity.EvaDTO;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.springframework.stereotype.Repository;

import java.util.List;
@Repository
public interface EvaMapper {

    @Select("select e.id,e.eva_content,e.eva_time,u.username,e.is_nm," +
            "t.type_name,e.app_status from tb_eva e,tb_user u,tb_kf_room" +
            " r,tb_kf_type t where e.user_id=u.id and e.kf_id=r.id and r.kf_type_id=t.id")
    public List<EvaDTO> getEvaDTOList();

    @Update("update tb_eva e set e.app_status=#{app_status} where e.id=#{id} ")
    public void checkEva(@Param("app_status") String app_status, @Param("id") int id);
}
